package com.zhaungjie.base.utils.ExcelUtil.spi;


import com.zhaungjie.base.utils.ExcelUtil.ExcelUtil;

import java.io.ByteArrayOutputStream;
import java.io.OutputStream;
import java.util.List;

/**
 * excel util处理程序
 *
 * @author zhuangjie
 * @date 2024/06/02
 */

public abstract class ExcelUtilWriteHandler {
    protected List<ExcelUtil.ExcelSheet> excelSheetList;
    /**
     * 写出excel的输出流
     */
    protected OutputStream outputStream;
    public ExcelUtilWriteHandler(List<ExcelUtil.ExcelSheet> excelSheetList) {
        this(excelSheetList,new ByteArrayOutputStream());
    }
    public ExcelUtilWriteHandler(List<ExcelUtil.ExcelSheet> excelSheetList, OutputStream outputStream) {
        this.excelSheetList = excelSheetList;
        this.outputStream = outputStream;
    }

    /**
     * 输出excel
     *
     * @param outputStream 输出流
     */
    public abstract void outputExcel(OutputStream outputStream);


}
